<script setup lang="ts" name="Father">
import {ref} from "vue";
import Son from './Son.vue'
let car = ref('奔驰')

let t = ref('')
function getT(value:string) {
  t.value = value
}
</script>

<template>
  <h2>父组件的值:{{car}}</h2>
  <h2 v-if="t">父组件收到的值：{{t}}</h2>
  <br>
  <Son :car="car" :sendT="getT"/>
</template>

<style scoped>
</style>